Skip to content

docs(macos): update macOS colcon build with custom python binary - #7517

Open
erickisos wants to merge 2 commits into
ros2:rollingfrom
erickisos:patch-1
Open

erickisos wants to merge 2 commits into
ros2:rollingfrom
erickisos:patch-1

Conversation

@erickisos

Copy link
Copy Markdown
Contributor

Description

While trying to build ROS2 Lyrical I found that the colcon compilation found "the wrong" binary, since everything was installed in a different pyenv, this failure got me a stacktrace like this:

--- stderr: ament_cmake_core
Traceback (most recent call last):
  File "~/ros2_lyrical/src/ament/ament_cmake/ament_cmake_core/cmake/core/package_xml_2_cmake.py", line 22, in <module>
    from catkin_pkg.package import parse_package_string
ModuleNotFoundError: No module named 'catkin_pkg'
CMake Error at cmake/core/ament_package_xml.cmake:95 (message):

  execute_process(/opt/homebrew/Frameworks/Python.framework/Versions/3.15/bin/python3
 ~/ros2_lyrical/src/ament/ament_cmake/ament_cmake_core/cmake/core/package_xml_2_cmake.py
  ~/ros2_lyrical/src/ament/ament_cmake/ament_cmake_core/package.xml
  ~/ros2_lyrical/build/ament_cmake_core/ament_cmake_core/package.cmake)
  returned error code 1
Call Stack (most recent call first):
  cmake/core/ament_package_xml.cmake:49 (_ament_package_xml)
  CMakeLists.txt:15 (ament_package_xml)

This error disappeared after maually defining the Python3 executable location via cmake args, but I?m open to alternatives to that since I've faced similar issues in the past and might be good to include it here (but always open for feedback or a better place to put this).

@erickisos erickisos changed the title chore(macos): update macOS colcon build with custom python binary docs(macos): update macOS colcon build with custom python binary Nov 26, 2026

@fujitatomoya fujitatomoya left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you target rollling branch instead? that is the development branch, and then we can backport to the downstream.

Signed-off-by: Erick G. Islas-Osuna <erickisos653@gmail.com>
@erickisos
erickisos changed the base branch from lyrical to rolling November 26, 2026 16:09

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants